package com.test.ssm.article.entity.vo;

import java.util.HashMap;
import java.util.Map;

public class ResponseMessage {
    private boolean success;
    private int code;
    private String message;
    private Map<String,Object> details = new HashMap<>();

    public boolean isSuccess() {
        return success;
    }

    public ResponseMessage setSuccess(boolean success) {
        this.success = success;
        return this;
    }

    public int getCode() {
        return code;
    }

    public ResponseMessage setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public ResponseMessage setMessage(String message) {
        this.message = message;
        return this;
    }

    public Map<String, Object> getDetails() {
        return details;
    }

    public ResponseMessage add(String key,Object value){
        details.put(key,value);
        return this;
    }


    public ResponseMessage addAll(Map<String,Object> map){
        details.putAll(map);
        return this;
    }
}
